package com.itheima.mapper;

import com.itheima.pojo.OrderDTO;
import com.itheima.pojo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMobileMapper {
    /**
     *根据id查询预约信息
     * @param id
     * @return
     */
    OrderVo getById(@Param("id") Integer id);

    /**
     * 插入数据
     * @param orderDTO
     */
    void insert(OrderDTO orderDTO);

    /**
     * 根据会员id查询套餐id
     * @param id
     * @return
     */
    @Select("select setmeal_id from t_order where member_id = #{id}")
    List<Integer> getByMember(@Param("id") Integer id);
}
